package com.cc.spring.mapper;

import com.cc.spring.domain.User;
import com.cc.spring.request.UserLikeRequest;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {
    int deleteByPrimaryKey(Long id);

    int insert(User record);

    User selectByPrimaryKey(Long id);

    List<User> selectAll();

    int updateByPrimaryKey(User record);
//    根据用户名查询
    User getUserByUserName(@Param("userName") String userName);
//    模糊查询
    List<User> getUsersLikeUsername(UserLikeRequest userLikeRequest);
//    更改密码
    void updateUserPassword( @Param("id") Long id, @Param("password") String password);
//    批量导入
    int batchImportUser(@Param("users") List<User> users);
}